Skip to content

Param vector updates#418

Open
CloneDeath wants to merge 4 commits into
mrc-ide:masterfrom
CloneDeath:param-vector-updates
Open

Param vector updates#418
CloneDeath wants to merge 4 commits into
mrc-ide:masterfrom
CloneDeath:param-vector-updates

Conversation

@CloneDeath

Copy link
Copy Markdown
Contributor

Converted a couple more fields in Param to BoundingBox.
Converted location of infected to a Vector2.
Simple usage updates (will use more Vector math in a future PR, wanted to keep this one simple).

Comment thread src/Geometry/Vector2.cpp
return left + Vector2<double>(right);
}
Vector2<double> Geometry::operator+(const Vector2<float> &left, const Vector2<double> &right){
return Vector2<double>(left) + right;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return Vector2<double>(left) + right;
return right + Vector2<double>(left);

Uses associativity of addition here. In that case, if you change something in one of the two, you don't have to change the other one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants